from PIL import Image
import os

size = (50,50)

with Image.open('./images/bj.png') as im :
    #im.show()
    im.thumbnail(size)
    im.show()
    im.save('./images/thum_bj.png')

